Skip to main content

date_by_duration

1. Description

The Date By Duration Calculation Type is used to calculate a date by incrementing/decrementing a date field by days, months or years.

2. Syntax


{
"name": "",
"typ": "",
"position": "",
"is_required_in_op": "",
"op_val": {
"calc_type": "DATE_BY_DURATION",
"req_fields": {
"name":"".
"days":"",
"months":"",
"years":"",
"incr_or_decr":""
}
}
}

Click ⬇️ to download the sample data.

3. Required Fields

  • name: Output Field Name.
  • typ: Output Field Type. Possible values are: "I64".
  • position: Position of the Output Field.
  • is_required_in_op: Determines if the field should be printed in the output ("true") or derived and stored for future use ("false").
  • op_val
    • calc_type: The calculation type used to derive this output field, which for date by duration is "DATE_BY_DURATION".
    • req_fields
      • name: Field name from the input metadata / output config to be incremented/decremented.
      • days: Number of days to be incremented/decremented to the date field.
      • months: Number of days to be incremented/decremented to the date field.
      • years: Number of days to be incremented/decremented to the date field.
      • incr_or_decr: This flag decided where to increment/decrement the offsets. Possible values are: "INCREMENT" or "DECREMENT".

4. Example


{
"name": "next_repricing_date",
"typ": "I64",
"position": "1",
"is_required_in_op": "true",
"op_val": {
"calc_type": "DATE_BY_DURATION",
"req_fields": {
"name":"last_repricing_date".
"days":"0",
"months":"3",
"years":"1",
"incr_or_decr":"INCREMENT"
}
}
}